<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<div class="row">

    <form class="editForm" style="margin-top: 15px" action="${saveUrl}" method="post" responseType="JSON" role="form"
          id="editForm_${serializeNum}"
          data-bv-submitButtons="#editFormSubmitBtn_${serializeNum}"
          data-bv-message="This value is not valid"
          data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
          data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
          data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
        <input type="hidden" name="id" value="${editEntity.id}">
        <input type="hidden" name="targetDataId" id="targetDataId" value="${targetDataId}">

        <!--<#if (true && editModel=='add')||(true && editModel=='edit')>-->
        <!--<div class="col-xm-12 col-sm-6 col-lg-12">-->
        <!--<div class="form-group">-->
        <!--<label for="number" class="col-sm-2 col-sm-offset-2 control-label no-padding-right">订金编号：</label>-->
        <!--<div class="col-sm-4">-->
        <!--<input data-bv-message="The field is not valid" size="50" name="number" alt="订金编号" id="number"-->
        <!--placeholder="订金编号" type="text" title="订金编号" class="form-control"-->
        <!--value="${editEntity.number}"/>-->
        <!--<span class="text"></span>-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--</#if>-->


        <#if (true && editModel=='add')||(true && editModel=='edit')>
            <div class="col-xm-12 col-sm-6 col-lg-12">
                <div class="form-group">
                    <label for="amount" class="col-sm-2 col-sm-offset-2 control-label no-padding-right"><span style="color:red">*</span>定金金额：</label>
                    <div class="col-sm-4">
                        <input data-bv-integer-message="The field is number" data-bv-message="The field is not valid"
                               data-bv-integer="true" size="11" name="amount" alt="定金金额" id="amount" placeholder="定金金额"
                               type="text" title="定金金额" class="form-control" value="${editEntity.amount}"/>
                        <span class="text"></span>
                    </div>
                </div>
            </div>
        </#if>

        <#if (true && editModel=='add')||(true && editModel=='edit')>
            <div class="col-xm-12 col-sm-6 col-lg-12">
                <div class="form-group">
                    <label class="col-sm-3 col-sm-offset-1 control-label no-padding-right"><span style="color:red">*</span>所属顾问：</label>
                    <div class="col-sm-6">
                        <select  class="col-sm-5" value="" >
                        </select>
                    </div>
                </div>
            </div>
        </#if>


        <#if (true && editModel=='add')||(true && editModel=='edit')>
            <div class="col-xm-12 col-sm-6 col-lg-12">
                <div class="form-group">
                    <label for="remark" class="col-sm-2 col-sm-offset-2 control-label no-padding-right">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</label>
                    <div class="col-sm-6">
                        <textarea class="form-control" name="remark" size="500" rows="2" style="resize:none" id="remark" value="${editEntity.remark}"></textarea>
                        <!--<input data-bv-message="The field is not valid" size="500" name="remark" alt="备注" id="remark"-->
                        <!--placeholder="备注" type="text" title="备注" class="form-control"-->
                        <!--value="${editEntity.remark}"/>-->
                        <!--<span class="text"></span>-->
                    </div>
                </div>
            </div>
        </#if>
        <div class="col-sm-12 margin-top-20">
            <div class="text-align-center">
                <button style="width: 80px;margin-right: 20px" type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">确定</button>
                <input style="width: 80px" type="button" class="btn btn-blue" data-dismiss="modal" value="取消"/>
            </div>
        </div>
    </form>
</div>

<script src="assets/js/validation/bootstrapValidator_init.js"></script>
<script>
    $(".selectpicker_${serializeNum}").select2();

    $("#editForm_${serializeNum}").bind("ajaxSubmitCallback", function (event, result) {
        alert(result.resMsg);
        if (result.resCode == 200) {
            bootbox.hideAll();
        }
    });
</script>